$(document).on("click", ".addButton", function () {
//	标准after操作
//	$(this).parent().parent().after("<div class='form-group' id='nameTemplate'><label class='col-lg-3 col-sm-3 col-xs-2 control-label'></label><div class='col-lg-5 col-xs-5'><input class='form-control' type='text' name='name' placeholder='请输入'/></div><div class='col-lg-4 col-sm-4 col-xs-4'><button type='button' class='btn btn-default btn-sm removeButton'>删除</button></div></div>");
//	获取标题的名字,然后复制
    var placetext = $(this).parent().siblings().html();
//	appendTo()方法
    $('<div class="">\n' +
        '                                        <div class="form-group">\n' +
        '                                            <label class="col-lg-2 control-label">产品规格：</label>\n' +
        '                                            <div class="col-lg-8">\n' +
        '                                                    <label class="col-lg-2 control-label">规格名称：</label>\n' +
        '                                                    <div class="col-lg-3">\n' +
        '                                                        <input type="text" class="form-control specificationNames" placeholder="规格名称"/>\n' +
        '                                                    </div>\n' +
        '                                                    <label class="col-lg-2 control-label">阅读宝数量：</label>\n' +
        '                                                    <div class="col-lg-2">\n' +
        '                                                        <input type="text" class="form-control prices" value="0" placeholder="阅读宝数量" onkeyup="value=value.replace(/[^\\d{1,}\\.\\d{1,}|\\d{1,}]/g,\'\')"/>\n' +
        '                                                    </div>\n' +
        '                                                    <label class="col-lg-1 control-label">现金：</label>\n' +
        '                                                    <div class="col-lg-2">\n' +
        '                                                        <input type="text" class="form-control cash" value="0" placeholder="现金" onkeyup="value=value.replace(/[^\\d{1,}\\.\\d{1,}|\\d{1,}]/g,\'\')"/>\n' +
        '                                                    </div>\n' +
        '                                            </div>\n' +
        '                                            <div class="col-lg-2 col-sm-2 col-xs-2"><button type="button" data-toggle="modal" data-target="#myModal" class="btn btn-default btn-sm removeButton">删除</button></div>'+
        '                                        </div>\n' +
        '                                    </div>').appendTo($(this).parent().parent().parent());
//	after添加变量方法
//	$(this).parent().parent().after(function(){
//			return "<div class='form-group' id='nameTemplate'><label class='col-lg-3 col-sm-3 col-xs-2 control-label'></label><div class='col-lg-5 col-xs-5'><input class='form-control' type='text' name='name' value='" + placetext + "' placeholder='" + placetext + "'/></div><div class='col-lg-4 col-sm-4 col-xs-4'><button type='button' data-toggle='modal' data-target='#myModal' class='btn btn-default btn-sm removeButton'>删除</button></div></div>";
//	});
//
});
//$(document).on("click",".removeButton",function(){
//	$(this).parent().parent().remove();
//})
function updatelist(thisun) {
    $(thisun).parent().parent().remove();
}

$(document).on("click", ".addQueswer", function () {
    $("<div><div class='form-group'><label class='col-lg-3 control-label'>问</label><div class='col-lg-5'><input type='text'class='form-control'name='username'value=''placeholder='请加上“问：”'/></div><div class='col-lg-4 col-sm-4 col-xs-4'><button type='button'class='btn btn-default btn-sm removeQueswer'data-template='name' data-toggle='modal' data-target='#myModal'>删除问答</button></div></div><div class='form-group has-feedback'><label class='col-lg-3 control-label'><trans oldtip='Bio'newtip='答'>答</trans></label><div class='col-lg-5'><textarea class='form-control'name='bio'placeholder='请加上“答：”'rows='10'data-fv-stringlength=''data-fv-stringlength-max='100'data-fv-stringlength-message='The bio must be less than 100 characters long'data-fv-field='bio'></textarea><i class='form-control-feedback'data-fv-icon-for='bio'style='display: none;'></i><small class='help-block'data-fv-validator='stringLength'data-fv-for='bio'data-fv-result='NOT_VALIDATED'style='display: none;'>内容过长，不得超过100字</small></div></div></div>").appendTo($(this).parent().parent().parent().parent());
});

function theQueswer(thistwo) {
    $(thistwo).parent().parent().parent().remove();
}